package cn.gson.school.entity.jiuye;

import java.util.Date;

import javax.persistence.*;
import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * 归档记录表
 * 
 * @author 华少
 *
 */

@Entity
@Table(name = "tb_jy_file")
public class FileEntity {
	/**
	 * file_id 归档记录编号
	 *  offer_id 邮件编号
	 *   employment_time 就业时间 
	 *   probation_salary 试用期薪水
	 * regular_salary 转正薪水
	 *  retest_plus 试用期 
	 *  userinfo_id 用户详情id 
	 *  file_reason 归档原因
	 */
	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	@Column(name = "file_id")
	private Long fileId;

	@OneToOne
	@JoinColumn(name = "offer_id", unique = true)
	private OfferEntity offerId;

	@Column(name = "employment_time")
	@JsonFormat(pattern="yyyy-MM-ddHH:mm:ss")
	private Date employmentTime;

	@Column(name = "probation_salary")
	private Double probationSalary;

	@Column(name = "regular_salary")
	private Double regularSalary;

	@Column(name = "retest_plus")
	private Integer retestPlus;

	@Column(name = "userinfo_id")
	private Long userinfoId;

	@Column(name = "file_reason")
	private String fileReason;

	public Long getFileId() {
		return fileId;
	}

	public void setFileId(Long fileId) {
		this.fileId = fileId;
	}

	public OfferEntity getOfferId() {
		return offerId;
	}

	public void setOfferId(OfferEntity offerId) {
		this.offerId = offerId;
	}

	public Date getEmploymentTime() {
		return employmentTime;
	}

	public void setEmploymentTime(Date employmentTime) {
		this.employmentTime = employmentTime;
	}

	public Double getProbationSalary() {
		return probationSalary;
	}

	public void setProbationSalary(Double probationSalary) {
		this.probationSalary = probationSalary;
	}

	public Double getRegularSalary() {
		return regularSalary;
	}

	public void setRegularSalary(Double regularSalary) {
		this.regularSalary = regularSalary;
	}

	public Integer getRetestPlus() {
		return retestPlus;
	}

	public void setRetestPlus(Integer retestPlus) {
		this.retestPlus = retestPlus;
	}

	public Long getUserinfoId() {
		return userinfoId;
	}

	public void setUserinfoId(Long userinfoId) {
		this.userinfoId = userinfoId;
	}

	public String getFileReason() {
		return fileReason;
	}

	public void setFileReason(String fileReason) {
		this.fileReason = fileReason;
	}

	@Override
	public String toString() {
		return "FileEntity [fileId=" + fileId + ", offerId=" + offerId + ", employmentTime=" + employmentTime
				+ ", probationSalary=" + probationSalary + ", regularSalary=" + regularSalary + ", retestPlus="
				+ retestPlus + ", userinfoId=" + userinfoId + ", fileReason=" + fileReason + "]";
	}

	
}
